<!DOCTYPE html PUBLIC"-//W3C//DTDXHTML1.0Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html lang="en"  ng-app="myApp" >
<head>
    <meta charset="UTF-8">
    <!-- 引入Bootstrap相关文件  -->
    <link href="http://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <!--[if IE 7]>
        <link rel="stylesheet" href="css/font-awesome-ie7.min.css">
    <![endif]-->
    <script src="js/jquery-3.1.0.js"></script>
    <script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>
    <script src="js/angular.js"></script>
    <script type="text/javascript" src="js/globalVar.js"></script>
    <script src="js/jquery.cookie.js"></script>
    <link href="css/main.css" rel="stylesheet">

    <title>E家月嫂</title>
</head>

<body onload="loadBody()" ng-controller="filterCtrl">

<!-- 导航栏 -->
<nav class="navbar navbar-default" role="navigation" style="padding:8px 0; margin-bottom: 0px; max-height: 70px;overflow: hidden">
    <ul class="nav nav-pills nav-justified">

        <li>
            <div class="navbar-header">
                <a class="navbar-brand" href="#" id="page-title">E家月嫂-后台录入系统</a>
            </div>
        </li>

        <li>
            <form class="navbar-form navbar-left" role="search" style="width:180px;">
                <div class="input-group input-group-xs">
                    <input type="text" class="form-control" placeholder="搜索月嫂" ng-model="matron_name"><span class="input-group-addon"><i class="icon-search id_cursor" ng-click="search()"></i></span>
                </div>
            </form>
            <p class="navbar-text  navbar-left" id="filter_icon" style="color:#aaaaaa;font-size:30px;margin:0 auto; padding: 0 auto;"><i style="cursor:pointer;" class="icon-filter icon-align-center icon-large" ng-click="control_filter()"></i></p>
        </li>

        <li>
            <p class="navbar-text  navbar-left" style="margin: 7px 10px 0px 0px; padding: 0 auto;cursor:pointer;"><img style="width:32px;height:35px;" id="head_img_model" src="img/head-img-model-unselect.png" ng-click="setImgModel()"></p>
            <p class="navbar-text  navbar-left" style="margin:7px 0px 0px 0px; padding: 0 auto;cursor:pointer;"><img style="width:32px;height:35px;" id="list_model" src="img/list-model-select.png" ng-click="setListModel()"></p>
            <button type="button" class="btn btn-success navbar-btn navbar-left" style="margin-left: 20px;" ng-click="turn2Add()">添加月嫂</button>
        </li>

        <li>
            <p class="navbar-text navbar-right" style="margin: 15px 0px 15px 10px;"><a href="create_user.html" class="navbar-link" style="color:#0000CC;">创建用户</a></p>
            <p class="navbar-text navbar-right" style="margin: 15px 0px 15px 10px;"><a href="modify-password.html" class="navbar-link" style="color:#0000CC;">修改密码</a></p>
            <p class="navbar-text navbar-right" style="margin: 15px 0px 15px 10px;"><a href="javascript:logout()" class="navbar-link" style="color:#0000CC;">登出</a></p>
            <p class="navbar-text navbar-right" id="maternity_name"></p>
        </li>

    </ul>
</nav>

<div class="container" style="width:100%;">

    <div class="row" ng-show="show_filter">
        <div class="filter-wrapper">
        <div class="span12 filter-items">
            <div class="filter-block">
                <span class="filter-item">籍贯：</span>
                <select id="province" ng-model="province" ng-options="province.p for province in provinces" ng-change="changeProvince()">
                    <option value="">全部</option>
                </select>
                <select id="city" ng-model="city" ng-options="city.n for city in cities">
                    <option value="">全部</option>
                </select>
            </div>
            <div class="filter-block">
                <span class="filter-item">年龄：</span>
                <input type="text"  ng-model="min_age" class="filter-input" ng-change="useFilter = true"/>
                <span class="filter-item"> - </span>
                <input type="text" ng-model="max_age" class="filter-input" ng-change="useFilter = true"/>
            </div>
            <div class="filter-block">
                <span class="filter-item">工作经验：</span>
                <input type="text" class="filter-input" ng-model="min_experience" ng-change="useFilter = true"/>
                <span class="filter-item"> - </span>
                <input type="text" class="filter-input" ng-model="max_experience" ng-change="useFilter = true"/>
            </div>
            <div class="filter-block">
                <span class="filter-item">级别：</span>
                <span id="level">全部</span><span> 星</span>
                <img src="img/icon-up.png" style="position:relative;bottom:4px;" ng-click="add_star();useFilter = true">
                <img src="img/icon-down.png"  style="position:relative; right:14.3px; top:3px;" ng-click="minus_star();useFilter = true">
            </div>
            <div class="filter-block">
                <span class="filter-item">用户评分：</span>
                <input type="text" class="filter-input" ng-model="min_star" ng-change="useFilter = true"/>
                <span class="filter-item"> - </span>
                <input type="text" class="filter-input" ng-model="max_star" ng-change="useFilter = true"/>
            </div>
            <div class="filter-block">
                <span class="filter-item">评价数量：</span>
                <input type="text"  class="filter-input" ng-model="min_evaluation_number" ng-change="useFilter = true"/>
                <span class="filter-item"> - </span>
                <input type="text" class="filter-input" ng-model="max_evaluation_number" ng-change="useFilter = true"/>
            </div>
            <button type="button" class="btn btn-success" ng-click="searchByFilter()">筛选</button>
        </div>
    </div>
</div>

    <div class="row">
        <div class="table-wrapper">
            <table class="table table-bordered table-hover" style="margin-bottom: 10px;">
                <thead>
                    <tr>
                        <th class="no-border"><span id="select_all" style="cursor:pointer;" ng-click="selectAll()">全选</span></th>
                        <th class="no-border"><span>ID</span><i class="icon-sort" ng-click="sort_by_id()"></i></th>
                        <th class="no-border"><span>姓名</span><i class="icon-sort" ng-click="sort_by_name()"></i></th>
                        <th class="no-border"><span>年龄</span><i class="icon-sort" ng-click="sort_by_age()"></i></th>
                        <th class="no-border"><span>籍贯</span><i class="icon-sort" ng-click="sort_by_province()"></i></th>
                        <th class="no-border"><span>工作经验</span><i class="icon-sort" ng-click="sort_by_experience()"></i></th>
                        <th class="no-border"><span>级别</span><i class="icon-sort" ng-click="sort_by_level()"></i></th>
                        <th class="no-border"><span>用户评分</span><i class="icon-sort" ng-click="sort_by_star()"></i></th>
                        <th class="no-border"><span>评价数量</span><i class="icon-sort" ng-click="sort_by_grade_count()"></i></th>
                        <th class="no-border delete-hidden"><span class="id_cursor" ng-style="{'visibility':isMultiSel()? 'visible' : 'hidden'}" ng-click="deleteAll()">全部删除</span></th>
                    </tr>
                </thead>
                <tbody>

                    <tr ng-repeat=" x in matrons"  ng-mouseenter="myHover(x)" ng-mouseleave="myLeave(x)">
                        <td class="checkbox-no-border"><input type="checkbox" name="mycheckbox" ng-click="myClick(x)"/></td>
                        <td ng-click="turn2Info(x.id)" class="id_cursor">{{x.id}}</td>
                        <td style="width:64px; cursor: pointer" ng-click="onNameClick(x.id)"><img class="head-imgs" ng-src="{{x.head_img_url}}" ng-show="getModel()">{{x.name}}</td>
                        <td>{{x.age}}</td>
                        <td>{{x.birth_place}}</td>
                        <td>{{x.experience}}年</td>
                        <td>{{x.level}}</td>
                        <td>{{x.star}}</td>
                        <td>{{x.evaluation_number}}</td>
                        <td class="no-border delete-hidden"><span class="id_cursor" ng-style="{'visibility':x.show? 'visible' : 'hidden'}" ng-click="delete(x.id)">删除</span></td>
                    </tr>

                </tbody>
            </table>
        </div>
    </div>

    <div class="row">
        <div class="page-wrapper">
            <div class="set-number page-block">
                <span style="padding-right:10px;">每页显示</span>
                <a style="padding-right:10px;"><span ng-class="{true:'number-selected',false:'number-unselected'}[isFirstSelected]" ng-click="changePerPage(20)">20</span></a>
                <a style="padding-right:10px;"><span ng-class="{true:'number-selected',false:'number-unselected'}[isSecondSelected]" ng-click="changePerPage(50)">50</span></a>
                <a><span ng-class="{true:'number-selected',false:'number-unselected'}[isThirdSelected]" ng-click="changePerPage(100)">100</span></a>
            </div>
            <div class="np-page page-block">
                <a ng-click="previous()"><span class="previous-page">上一页</span></a>
                <ul class="pagination" style="margin: 0; padding:0;position:relative;top:10px;">
                    <li ng-repeat = "page in pages">
                        <a ng-click="selectPage(page)"> <span ng-class="{'active': isActivePage(page)}">{{ page }}</span></a>
                    </li>
                </ul>

                <a ng-click="next()"><span class="next-page">下一页</span></a>
            </div>
            <div class="turn-page page-block">
                <span>跳转第</span>
                <input type="text" class="input-line" ng-model="input_page" ng-keyup="turn2SelPage($event)">
                <span>页</span>
            </div>
        </div>
    </div>
</div>

<script src="js/overview_page.js"></script>

</body>
</html>